$(function(){
    var aa=location.search;
    var a=aa.substr(4,1);
    console.log(a)
    
    $.ajax({
        type:'get',
        url:'http://193.112.55.79:9090/api/getcouponproduct',
        data:{
            couponid:a
        },
        dataType:'json',
        success:function(res){
            console.log(res.result[0].couponProductImg);
            var html = template("navb",{"arr":res.result});
            $(".coupon_banner1").html(html);
        }
    })

  
  $(".coupon_banner1").on("tap",".tu",function(){
      console.log(789)
    //  $("body").css("background-color","rgba('0,0,0,.2')")
    $(".datu").css("display","block")
    $(".datu").css("background-color","rgba(0,0,0,.8)")
  })

  $("#lala").on("click",function(){
      console.log(123)
      $(".datu").css("display","none")
      $(".datu").css("background-color","#eee")
  })

 $(".youbian").on("click",function(){
     console.log(456)
     $("#lala").attr("src","./images/kfc-5ikfc-121_p16.jpg")
     
 })
 $(".zuobian").on("click",function(){
     $("#lala").attr("src","./images/kfc-5ikfc-108_pc27.jpg")
 })
   
})